package model

import "github.com/gogf/gf/v2/os/gtime"

type SystemConfigCreateInput struct {
	Code          string
	Name          string
	Content       string
	CategoryId    int64
	Remark        string
	IsAllowDelete int64
}

type SystemConfigUpdateInput struct {
	Code          string
	Name          string
	Content       string
	CategoryId    int64
	Remark        string
	IsAllowDelete int64
}

type SystemConfigListInput struct {
	Page       int
	PageSize   int
	Code       string
	Name       string
	CategoryId int64
}

type SystemConfigListItem struct {
	Id            uint64                    `json:"id"         orm:"id"         `                   //
	CategoryId    uint64                    `json:"category_id"         orm:"category_id"         ` //
	Code          string                    `json:"code"       orm:"code"       `                   // 配置项标识符
	Name          string                    `json:"name"       orm:"name"       `                   // 配置项名称
	Content       string                    `json:"content"    orm:"content"    `                   // 配置项值
	Remark        string                    `json:"remark" orm:"remark"`                            //配置项备注
	IsAllowDelete uint                      `json:"is_allow_delete" orm:"is_allow_delete" `         // 是否允许删除：1-允许删除；0-不允许删除
	CreatedBy     uint64                    `json:"created_by" orm:"created_by" `                   // 创建人
	UpdatedBy     uint64                    `json:"updated_by" orm:"updated_by" `                   // 更新人
	CreatedAt     *gtime.Time               `json:"created_at" orm:"created_at" `                   // 创建时间
	UpdatedAt     *gtime.Time               `json:"updated_at" orm:"updated_at" `                   // 更新时间
	CategoryInfo  SystemConfigCategoryInfo  `json:"category_info"`
	CreatedAdmin  SystemConfigAdminUserItem `json:"created_admin"`
	UpdatedAdmin  SystemConfigAdminUserItem `json:"updated_admin"`
}
type SystemConfigCategoryInfo struct {
	Id     uint64 `json:"id"`
	Name   string `json:"name"`
	Remark string `json:"remark"`
}

type SystemConfigAdminUserItem struct {
	Id       uint64 `json:"id"`
	Username string `json:"username"`
	Name     string `json:"name"`
	Avatar   string `json:"avatar"`
}

type SystemConfigListMapItem struct {
	Id            uint64 `json:"id"         orm:"id"         `           //
	Code          string `json:"code"       orm:"code"       `           // 配置项标识符
	Name          string `json:"name"       orm:"name"       `           // 配置项名称
	Content       string `json:"content"    orm:"content"    `           // 配置项值
	Remark        string `json:"remark" orm:"remark"`                    //配置项备注
	IsAllowDelete uint   `json:"is_allow_delete" orm:"is_allow_delete" ` // 是否允许删除：1-允许删除；0-不允许删除
}

type AdminWebsiteData struct {
	BaseAdminWebsiteName      string `json:"baseAdminWebsiteName" dc:"网站名称"`
	BaseAdminWebsiteLogo      string `json:"baseAdminWebsiteLogo" dc:"网站LOGO"`
	WsHeartbeatIntervalSecond int    `json:"wsHeartbeatIntervalSecond" dc:"websocket 定时器频率"`
}
